<?php
/**
 * Created by project.
 * User: huanzipap
 * Date: 2024/9/11
 * Time: 15:15
 */

use Hyperf\Crontab\Crontab;
use App\Task\PushBirthdayTask;

return [
    //是否开启定时任务
    'enable'  => true,

    //通过配置文件定义定时任务
    'crontab' => [
        //Callback类型定时任务(默认)
        (new Crontab())->setName('PushBirthday')->setRule('0 0 * * *')->setCallback([PushBirthdayTask::class,'execute'])->setMemo('这是一个示例的定时任务'),
    ],

];

